max.js ➔ max   A
last analyzed

Complexity

Conditions 3

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 3

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 7
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 3
crap 3
1
export default function max(original) {
2 55
    if (typeof original !== 'object' || original.length < 1) {
3 25
        return null;
4
    }
5
6 30
    return original.reduce((a, b) => Math.max(a, b));
7
}
8